package com.cai.servlet.common.user.log;

import com.cai.dao.MessageDao;
import com.cai.dao.ProcessInfoCenterDao;
import com.cai.dao.impl.MessageDaoImpl;
import com.cai.dao.impl.ProcessInfoCenterDaoImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author RuoLi
 * 获取帮助信息
 */
@WebServlet(name = "ServletGetMessage", value = "/common/log/GetMessage")
public class ServletGetMessage extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        MessageDao messageDao=new MessageDaoImpl();
        resp.getWriter().write(messageDao.selectAllMessage());
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doPost(req, resp);
    }
}
